import type {ExtractPropTypes, PropType} from 'vue'
import {buildProps} from "@/utils";

export const devViewExamplesProps = buildProps({
    imgUrl: {
        type: String,
        default: ''
    },
    buttonText: {
        type: String,
        default: '查看示例'
    },
    buttonLink: {
        type: Boolean,
        default: true
    },
    buttonType: {
        type: String as PropType<'primary' | 'success' | 'warning' | 'danger' | 'info' | 'default'>,
        default: 'primary'
    },
    trigger: {
        type: String as PropType<'click' | 'hover'>,
        default: 'click'
    },
    popoverStyle: {
        type: [Object, String] as any,
        default: 'width: 200px;height: 150px'
    },
    imageStyle: {
        type: [Object, String] as any,
        default: ''
    },
    describe: {
        type: String,
        default: '点击查看示例'
    },
    describeStyle: {
        type: [Object, String] as any,
        default: () => {
            return {color: '#999999', fontSize: '14px'}
        }
    }
} as const)
export type DevViewExamplesProps = ExtractPropTypes<typeof devViewExamplesProps>
